<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>我的藏酒</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<include file="public/comm"/>
	</head>

	<body>
		<header class="mui-bar mui-bar1 mui-bar-nav fs_xl">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title fs_xl">确认自提订单</h1>
		</header>
		<div class="mui-content fs_xl">
			<div class="tj_dd">
				<p class="tj_p1 fs_xl">提酒人信息：</p>
				<div class="tj_sp_info">
					<ul>
						<li class="mui-table-view-cell">
							<a><label>姓名</label><span >{$order_goodsinfo.consignee}</span></a>
						</li>
						<li class="mui-table-view-cell">
							<a><label>电话</label><span >{$order_goodsinfo.phone}</span></a>
						</li>
						<li class="mui-table-view-cell">
							<a><label>提酒时间</label><span>{$order_goodsinfo.extractDate}</span></a>
						</li>
						<li class="mui-table-view-cell">
							<a><label>提酒方式</label><span>预约自提</span></a>
						</li>
						<li class="mui-table-view-cell">
							<a>
								<label>藏酒编码</label>
								<volist name="order_goodsinfo.bottle_num" id="vo">
									<p class="fs_xl" style="padding: 0.4em 0.4em 0;">{$vo}</p>
								</volist>
							</a>
						</li>
					</ul>
				</div>
				<div class="tj_btn">
					<input type="submit" class="fs_xl" id="extract" value="确认" />
				</div>
<!-- 			<div class="tj_btn"> -->
<!-- 				<a class="fs_xl">确认</a> -->
<!-- 			</div> -->
			</div>
		</div>
		<script type="text/javascript">
		$(document).ready(function(){
			$("#extract").click(function(){
				//提取藏酒
				var orderid = {$order_goodsinfo['order_id']};
				var rec_id = {$order_goodsinfo['rec_id']};
				var goods_id = {$order_goodsinfo['goods_id']};
				var type = 0;//提酒
				var from_user_id = {$user_id};
				var consignee = {$order_goodsinfo['consignee']};
				var phone = {$order_goodsinfo['phone']};
				var date = {$order_goodsinfo['date']};
				var	extract_type = 1;//自提
				var type1 = {$type};//提酒类型， 1：提自己的藏酒   2：提赠送的藏酒
				var to_user_id = "";
				if(type1 == 2){
					var to_user_id = {$id};
				}
				var bottle_num = "{$order_goodsinfo['bottle_num1']}";
				var num = {$order_goodsinfo['num']};
				$.ajax({
					type:"POST",
					url:"/Mobile/User/cellar_oprate",
					data:{"order_id":orderid,"rec_id":rec_id,"goods_id":goods_id,"types":type,
						"from_user_id":from_user_id,"bottle_num":bottle_num,"to_user_id":to_user_id,
						"num":num,"consignee":consignee,"phone":phone,"date":date,"extract_type":extract_type},
					dataType:"json",
					success:function(data){
						if(data.status != 1){
							alert(data.msg);
						}else{
							alert(data.msg);
							location.href = "/mobile/User/cellar_list.html";
						}
					}
				});
			});
		});
		</script>
	</body>
</html>